package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.BeanCityIndustry;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.CityFocusModel;
import com.thrd.taiexhibition.view.CityFocusView;

/**
 * @author: ${唐杰}
 * @date: 2021/3/25
 */
public class CityFocusPresener {
    private CityFocusModel mCityFocusModel;
    private CityFocusView mCityFocusView;

    public CityFocusPresener(CityFocusView mCityFocusView){
        this.mCityFocusView=mCityFocusView;
        this.mCityFocusModel=new CityFocusModel();
    }

    public void getCityFocusData(long cityId){
        mCityFocusModel.getCityFocusData(cityId, new MvpCallback<BeanCityIndustry>() {
            @Override
            public void onSuccess(BeanCityIndustry beanHotActivityList) {
                mCityFocusView.onSuccess(beanHotActivityList);
            }

            @Override
            public void onFailed(String e, int code) {
                mCityFocusView.onError(e,code);
            }
        });
    }
}
